package com.seaboxdata.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seaboxdata.dao.BatchInterfaceConfigDao;
import com.seaboxdata.entity.BatchInterfaceConfig;
import com.seaboxdata.service.BatchInterfaceConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author
 * @create 2020-08-06 14:19
 **/
@Service("batchInterfaceConfigService")
public class BatchInterfaceConfigServiceImpl extends ServiceImpl<BatchInterfaceConfigDao,BatchInterfaceConfig> implements BatchInterfaceConfigService {

    @Autowired
    private BatchInterfaceConfigDao batchInterfaceConfigDao;

    @Override
    public List<BatchInterfaceConfig> getAllByStatusAndIsInit(String status, String isInit) {
        return batchInterfaceConfigDao.getAllByStatusAndIsInit(status,isInit);
    }

    @Override
    public void updateByTableName(String tableName) {
        batchInterfaceConfigDao.updateByTableName(tableName);
    }

    @Override
    public Integer getTotalCount(BatchInterfaceConfig batchInterfaceConfig) {
        return batchInterfaceConfigDao.getTotalCount(batchInterfaceConfig);
    }

    @Override
    public String getLatest(BatchInterfaceConfig batchInterfaceConfig) {
        return batchInterfaceConfigDao.getLatest(batchInterfaceConfig);
    }

    @Override
    public void updateIncresementColumnTableName(String tableName, String incresementColumn) {
        batchInterfaceConfigDao.updateIncresementColumnTableName(tableName,incresementColumn);
    }

    @Override
    public void deleteAll(BatchInterfaceConfig batchInterfaceConfig) {
        batchInterfaceConfigDao.deleteAll(batchInterfaceConfig);
    }

}
